/*
 * 作者: 侯晓宇
 * 时间: 2017-02-27
 * 说明：
 * Copyright (c) 2016-2017 中研沃兮
 */
define(function(require) {

	var c = require('app/utils/CommonUtils');
	var tip = require('app/utils/TipUtils');
	var EventUtils = require('app/utils/EventUtils');
	
	var param = api.pageParam;
	var s = {};

	s.startSmallLive = function() {
		
	}

	s.startFullLive = function() {
		var name = "LiveWin";
		api.openWin({
			name : name,
			url : 'widget://html/' + name + '.html',
			pageParam:param

		});
	}
	s.startPcLive = function(){
		c.l(param);
		var pageurl = param.pages[0].pageurl;
		var publishurl = param.pages[0].publishurl;
		api.alert({
			title:"点击确定键将推流地址保存至剪切板",
			msg:""+ publishurl
        },function(ret,err){
        	
        	var clipBoard = api.require('clipBoard');
			var value = publishurl;
			clipBoard.set({
			    value: value
			}, function(ret, err) {
			    if (ret) {
			    	api.toast({
		                msg:'已成功保存到剪贴板'
	                });
			    } else {
	
			    }
			});
		
        });
	}
	return s;
});
